Attribute VB_Name = "SROutputFileFees"
'WRITTEN BY JALISA GREENE
'LAST MODIFIED BY JALISA GREENE
'LAST UPDATED 6/10/2014

    
    Dim ASRrowNum As Integer
    Dim SRrowNum As Integer
    
Public Sub V1Charges(rowNum As Integer)
    ActiveCell.Offset(1, 3).Select
    If Worksheets("SR Data").Range("H" & rowNum) <> "" Then
        ActiveCell.Value = Worksheets("SR Data").Range("H" & rowNum)
        ActiveCell.Offset(0, 1).Value = Worksheets("SR Data").Range("I" & rowNum)
        ActiveCell.Offset(0, 2).Value = Worksheets("SR Data").Range("J" & rowNum)
        ActiveCell.Offset(0, 4).Value = Format(Worksheets("SR Data").Range("K" & rowNum), "Currency")
        If ActiveCell.Offset(0, 1) = "% of Subtotal" Then
            ActiveCell.Offset(0, 5).Value = Format(Worksheets("SR Data").Range("FN" & rowNum), "Percent")
        Else:
            ActiveCell.Offset(0, 5).Value = Format(Worksheets("SR Data").Range("L" & rowNum), "Currency")
        End If
        ActiveCell.Offset(0, 6).Value = Format(Worksheets("SR Data").Range("M" & rowNum), "Currency")
        ActiveCell.Offset(0, 8).Value = Format(Worksheets("SR Data").Range("N" & rowNum), "Currency")
        If ActiveCell.Offset(0, 1) = "% of Subtotal" Then
            ActiveCell.Offset(0, 9).Value = Format(Worksheets("SR Data").Range("FO" & rowNum), "Percent")
        Else:
            ActiveCell.Offset(0, 9).Value = Format(Worksheets("SR Data").Range("O" & rowNum), "Currency")
        End If
        ActiveCell.Offset(0, 10).Value = Format(Worksheets("SR Data").Range("P" & rowNum), "Currency")
        ActiveCell.Offset(0, 12).Formula = Format(Worksheets("SR Data").Range("Q" & rowNum), "Currency")
        ActiveCell.Offset(1).EntireRow.Insert
    End If
End Sub


Public Sub V2Charges(rowNum As Integer)
    ActiveCell.Offset(1, 3).Select
    While ActiveCell.Value <> ""
        ActiveCell.Offset(1).Select
    Wend
    If Worksheets("SR Data").Range("W" & rowNum) <> "" Then
        ActiveCell.Value = Worksheets("SR Data").Range("W" & rowNum)
        ActiveCell.Offset(0, 1).Value = Worksheets("SR Data").Range("X" & rowNum)
        ActiveCell.Offset(0, 2).Value = Worksheets("SR Data").Range("Y" & rowNum)
        ActiveCell.Offset(0, 4).Value = Format(Worksheets("SR Data").Range("Z" & rowNum), "Currency")
        If ActiveCell.Offset(0, 1) = "% of Subtotal" Then
            ActiveCell.Offset(0, 5).Value = Format(Worksheets("SR Data").Range("FP" & rowNum), "Percent")
        Else:
            ActiveCell.Offset(0, 5).Value = Format(Worksheets("SR Data").Range("AA" & rowNum), "Currency")
        End If
        ActiveCell.Offset(0, 6).Value = Format(Worksheets("SR Data").Range("AB" & rowNum), "Currency")
        ActiveCell.Offset(0, 8).Value = Format(Worksheets("SR Data").Range("AC" & rowNum), "Currency")
        If ActiveCell.Offset(0, 1) = "% of Subtotal" Then
            ActiveCell.Offset(0, 9).Value = Format(Worksheets("SR Data").Range("FQ" & rowNum), "Percent")
        Else:
            ActiveCell.Offset(0, 9).Value = Format(Worksheets("SR Data").Range("AD" & rowNum), "Currency")
        End If
        ActiveCell.Offset(0, 10).Value = Format(Worksheets("SR Data").Range("AE" & rowNum), "Currency")
        ActiveCell.Offset(0, 12).Value = Format(Worksheets("SR Data").Range("AF" & rowNum), "Currency")
        ActiveCell.Offset(1).EntireRow.Insert
    End If
End Sub

Public Sub V3Charges(rowNum As Integer)
    ActiveCell.Offset(1, 3).Select
    While ActiveCell.Value <> ""
        ActiveCell.Offset(1).Select
    Wend
    If Worksheets("SR Data").Range("AJ" & rowNum) <> "" Then
        ActiveCell.Value = Worksheets("SR Data").Range("AJ" & rowNum)
        ActiveCell.Offset(0, 1).Value = Worksheets("SR Data").Range("AK" & rowNum)
        ActiveCell.Offset(0, 2).Value = Worksheets("SR Data").Range("AL" & rowNum)
        ActiveCell.Offset(0, 4).Value = Format(Worksheets("SR Data").Range("AM" & rowNum), "Currency")
        If ActiveCell.Offset(0, 1) = "% of Subtotal" Then
            ActiveCell.Offset(0, 5).Value = Format(Worksheets("SR Data").Range("FR" & rowNum), "Percent")
        Else:
            ActiveCell.Offset(0, 5).Value = Format(Worksheets("SR Data").Range("AN" & rowNum), "Currency")
        End If
        ActiveCell.Offset(0, 6).Value = Format(Worksheets("SR Data").Range("AO" & rowNum), "Currency")
        ActiveCell.Offset(0, 8).Value = Format(Worksheets("SR Data").Range("AP" & rowNum), "Currency")
        If ActiveCell.Offset(0, 1) = "% of Subtotal" Then
            ActiveCell.Offset(0, 9).Value = Format(Worksheets("SR Data").Range("FS" & rowNum), "Percent")
        Else:
            ActiveCell.Offset(0, 9).Value = Format(Worksheets("SR Data").Range("AQ" & rowNum), "Currency")
        End If
        ActiveCell.Offset(0, 10).Value = Format(Worksheets("SR Data").Range("AR" & rowNum), "Currency")
        ActiveCell.Offset(0, 12).Value = Format(Worksheets("SR Data").Range("AS" & rowNum), "Currency")
        ActiveCell.Offset(1).EntireRow.Insert
    End If
End Sub

Public Sub V4Charges(rowNum As Integer)
    ActiveCell.Offset(1, 3).Select
    While ActiveCell.Value <> ""
        ActiveCell.Offset(1).Select
    Wend
    If Worksheets("SR Data").Range("AW" & rowNum) <> "" Then
        ActiveCell.Value = Worksheets("SR Data").Range("AW" & rowNum)
        ActiveCell.Offset(0, 1).Value = Worksheets("SR Data").Range("AX" & rowNum)
        ActiveCell.Offset(0, 2).Value = Worksheets("SR Data").Range("AY" & rowNum)
        ActiveCell.Offset(0, 4).Value = Format(Worksheets("SR Data").Range("AZ" & rowNum), "Currency")
        If ActiveCell.Offset(0, 1) = "% of Subtotal" Then
            ActiveCell.Offset(0, 5).Value = Format(Worksheets("SR Data").Range("FT" & rowNum), "Percent")
        Else:
            ActiveCell.Offset(0, 5).Value = Format(Worksheets("SR Data").Range("BA" & rowNum), "Currency")
        End If
        ActiveCell.Offset(0, 6).Value = Format(Worksheets("SR Data").Range("BB" & rowNum), "Currency")
        ActiveCell.Offset(0, 8).Value = Format(Worksheets("SR Data").Range("BC" & rowNum), "Currency")
        If ActiveCell.Offset(0, 1) = "% of Subtotal" Then
            ActiveCell.Offset(0, 9).Value = Format(Worksheets("SR Data").Range("FU" & rowNum), "Percent")
        Else:
            ActiveCell.Offset(0, 9).Value = Format(Worksheets("SR Data").Range("BD" & rowNum), "Currency")
        End If
        ActiveCell.Offset(0, 10).Value = Format(Worksheets("SR Data").Range("BE" & rowNum), "Currency")
        ActiveCell.Offset(0, 12).Value = Format(Worksheets("SR Data").Range("BF" & rowNum), "Currency")
        ActiveCell.Offset(1).EntireRow.Insert
    End If
End Sub

Public Sub V5Charges(rowNum As Integer)
    ActiveCell.Offset(1, 3).Select
    While ActiveCell.Value <> ""
        ActiveCell.Offset(1).Select
    Wend
    If Worksheets("SR Data").Range("BJ" & rowNum) <> "" Then
        ActiveCell.Value = Worksheets("SR Data").Range("BJ" & rowNum)
        ActiveCell.Offset(0, 1).Value = Worksheets("SR Data").Range("BK" & rowNum)
        ActiveCell.Offset(0, 2).Value = Worksheets("SR Data").Range("BL" & rowNum)
        ActiveCell.Offset(0, 4).Value = Format(Worksheets("SR Data").Range("BM" & rowNum), "Currency")
        If ActiveCell.Offset(0, 1) = "% of Subtotal" Then
            ActiveCell.Offset(0, 5).Value = Format(Worksheets("SR Data").Range("FV" & rowNum), "Percent")
        Else:
            ActiveCell.Offset(0, 5).Value = Format(Worksheets("SR Data").Range("BN" & rowNum), "Currency")
        End If
        ActiveCell.Offset(0, 6).Value = Format(Worksheets("SR Data").Range("BO" & rowNum), "Currency")
        ActiveCell.Offset(0, 8).Value = Format(Worksheets("SR Data").Range("BP" & rowNum), "Currency")
        If ActiveCell.Offset(0, 1) = "% of Subtotal" Then
            ActiveCell.Offset(0, 9).Value = Format(Worksheets("SR Data").Range("FW" & rowNum), "Percent")
        Else:
            ActiveCell.Offset(0, 9).Value = Format(Worksheets("SR Data").Range("BQ" & rowNum), "Currency")
        End If
        ActiveCell.Offset(0, 10).Value = Format(Worksheets("SR Data").Range("BR" & rowNum), "Currency")
        ActiveCell.Offset(0, 12).Value = Format(Worksheets("SR Data").Range("BS" & rowNum), "Currency")
        ActiveCell.Offset(1).EntireRow.Insert
    End If
End Sub

Public Sub V6Charges(rowNum As Integer)
    ActiveCell.Offset(1, 3).Select
    While ActiveCell.Value <> ""
        ActiveCell.Offset(1).Select
    Wend
    If Worksheets("SR Data").Range("BW" & rowNum) <> "" Then
        ActiveCell.Value = Worksheets("SR Data").Range("BW" & rowNum)
        ActiveCell.Offset(0, 1).Value = Worksheets("SR Data").Range("BX" & rowNum)
        ActiveCell.Offset(0, 2).Value = Worksheets("SR Data").Range("BY" & rowNum)
        ActiveCell.Offset(0, 4).Value = Format(Worksheets("SR Data").Range("BZ" & rowNum), "Currency")
        If ActiveCell.Offset(0, 1) = "% of Subtotal" Then
            ActiveCell.Offset(0, 5).Value = Format(Worksheets("SR Data").Range("FX" & rowNum), "Percent")
        Else:
            ActiveCell.Offset(0, 5).Value = Format(Worksheets("SR Data").Range("CA" & rowNum), "Currency")
        End If
        ActiveCell.Offset(0, 6).Value = Format(Worksheets("SR Data").Range("CB" & rowNum), "Currency")
        ActiveCell.Offset(0, 8).Value = Format(Worksheets("SR Data").Range("CC" & rowNum), "Currency")
        If ActiveCell.Offset(0, 1) = "% of Subtotal" Then
            ActiveCell.Offset(0, 9).Value = Format(Worksheets("SR Data").Range("FY" & rowNum), "Percent")
        Else:
            ActiveCell.Offset(0, 9).Value = Format(Worksheets("SR Data").Range("CD" & rowNum), "Currency")
        End If
        ActiveCell.Offset(0, 10).Value = Format(Worksheets("SR Data").Range("CE" & rowNum), "Currency")
        ActiveCell.Offset(0, 12).Value = Format(Worksheets("SR Data").Range("CF" & rowNum), "Currency")
        ActiveCell.Offset(1).EntireRow.Insert
    End If
End Sub

Public Sub V7Charges(rowNum As Integer)
    ActiveCell.Offset(1, 3).Select
    While ActiveCell.Value <> ""
        ActiveCell.Offset(1).Select
    Wend
    If Worksheets("SR Data").Range("CJ" & rowNum) <> "" Then
        ActiveCell.Value = Worksheets("SR Data").Range("CJ" & rowNum)
        ActiveCell.Offset(0, 1).Value = Worksheets("SR Data").Range("CK" & rowNum)
        ActiveCell.Offset(0, 2).Value = Worksheets("SR Data").Range("CL" & rowNum)
        ActiveCell.Offset(0, 4).Value = Format(Worksheets("SR Data").Range("CM" & rowNum), "Currency")
        If ActiveCell.Offset(0, 1) = "% of Subtotal" Then
            ActiveCell.Offset(0, 5).Value = Format(Worksheets("SR Data").Range("FZ" & rowNum), "Percent")
        Else:
            ActiveCell.Offset(0, 5).Value = Format(Worksheets("SR Data").Range("CN" & rowNum), "Currency")
        End If
        ActiveCell.Offset(0, 6).Value = Format(Worksheets("SR Data").Range("CO" & rowNum), "Currency")
        ActiveCell.Offset(0, 8).Value = Format(Worksheets("SR Data").Range("CP" & rowNum), "Currency")
        If ActiveCell.Offset(0, 1) = "% of Subtotal" Then
            ActiveCell.Offset(0, 9).Value = Format(Worksheets("SR Data").Range("GA" & rowNum), "Percent")
        Else:
            ActiveCell.Offset(0, 9).Value = Format(Worksheets("SR Data").Range("CQ" & rowNum), "Currency")
        End If
        ActiveCell.Offset(0, 10).Value = Format(Worksheets("SR Data").Range("CR" & rowNum), "Currency")
        ActiveCell.Offset(0, 12).Value = Format(Worksheets("SR Data").Range("CS" & rowNum), "Currency")
        ActiveCell.Offset(1).EntireRow.Insert
    End If
End Sub

Public Sub V8Charges(rowNum As Integer)
    ActiveCell.Offset(1, 3).Select
    While ActiveCell.Value <> ""
        ActiveCell.Offset(1).Select
    Wend
    If Worksheets("SR Data").Range("CW" & rowNum) <> "" Then
        ActiveCell.Value = Worksheets("SR Data").Range("CW" & rowNum)
        ActiveCell.Offset(0, 1).Value = Worksheets("SR Data").Range("CX" & rowNum)
        ActiveCell.Offset(0, 2).Value = Worksheets("SR Data").Range("CY" & rowNum)
        ActiveCell.Offset(0, 4).Value = Format(Worksheets("SR Data").Range("CZ" & rowNum), "Currency")
        If ActiveCell.Offset(0, 1) = "% of Subtotal" Then
            ActiveCell.Offset(0, 5).Value = Format(Worksheets("SR Data").Range("GB" & rowNum), "Percent")
        Else:
            ActiveCell.Offset(0, 5).Value = Format(Worksheets("SR Data").Range("DA" & rowNum), "Currency")
        End If
        ActiveCell.Offset(0, 6).Value = Format(Worksheets("SR Data").Range("DB" & rowNum), "Currency")
        ActiveCell.Offset(0, 8).Value = Format(Worksheets("SR Data").Range("DC" & rowNum), "Currency")
        If ActiveCell.Offset(0, 1) = "% of Subtotal" Then
            ActiveCell.Offset(0, 9).Value = Format(Worksheets("SR Data").Range("GC" & rowNum), "Percent")
        Else:
            ActiveCell.Offset(0, 9).Value = Format(Worksheets("SR Data").Range("DD" & rowNum), "Currency")
        End If
        ActiveCell.Offset(0, 10).Value = Format(Worksheets("SR Data").Range("DE" & rowNum), "Currency")
        ActiveCell.Offset(0, 12).Value = Format(Worksheets("SR Data").Range("DF" & rowNum), "Currency")
        ActiveCell.Offset(1).EntireRow.Insert
    End If
End Sub

Public Sub V9Charges(rowNum As Integer)
    ActiveCell.Offset(1, 3).Select
    While ActiveCell.Value <> ""
        ActiveCell.Offset(1).Select
    Wend
    If Worksheets("SR Data").Range("DJ" & rowNum) <> "" Then
        ActiveCell.Value = Worksheets("SR Data").Range("DJ" & rowNum)
        ActiveCell.Offset(0, 1).Value = Worksheets("SR Data").Range("DK" & rowNum)
        ActiveCell.Offset(0, 2).Value = Worksheets("SR Data").Range("DL" & rowNum)
        ActiveCell.Offset(0, 4).Value = Format(Worksheets("SR Data").Range("DM" & rowNum), "Currency")
        If ActiveCell.Offset(0, 1) = "% of Subtotal" Then
            ActiveCell.Offset(0, 5).Value = Format(Worksheets("SR Data").Range("GD" & rowNum), "Percent")
        Else:
            ActiveCell.Offset(0, 5).Value = Format(Worksheets("SR Data").Range("DN" & rowNum), "Currency")
        End If
        ActiveCell.Offset(0, 6).Value = Format(Worksheets("SR Data").Range("DO" & rowNum), "Currency")
        ActiveCell.Offset(0, 8).Value = Format(Worksheets("SR Data").Range("DP" & rowNum), "Currency")
        If ActiveCell.Offset(0, 1) = "% of Subtotal" Then
            ActiveCell.Offset(0, 9).Value = Format(Worksheets("SR Data").Range("GE" & rowNum), "Percent")
        Else:
            ActiveCell.Offset(0, 9).Value = Format(Worksheets("SR Data").Range("DQ" & rowNum), "Currency")
        End If
        ActiveCell.Offset(0, 10).Value = Format(Worksheets("SR Data").Range("DR" & rowNum), "Currency")
        ActiveCell.Offset(0, 12).Value = Format(Worksheets("SR Data").Range("DS" & rowNum), "Currency")
        ActiveCell.Offset(1).EntireRow.Insert
    End If
End Sub

Public Sub V10Charges(rowNum As Integer)
    ActiveCell.Offset(1, 3).Select
    While ActiveCell.Value <> ""
        ActiveCell.Offset(1).Select
    Wend
    If Worksheets("SR Data").Range("DW" & rowNum) <> "" Then
        ActiveCell.Value = Worksheets("SR Data").Range("DW" & rowNum)
        ActiveCell.Offset(0, 1).Value = Worksheets("SR Data").Range("DX" & rowNum)
        ActiveCell.Offset(0, 2).Value = Worksheets("SR Data").Range("DY" & rowNum)
        ActiveCell.Offset(0, 4).Value = Format(Worksheets("SR Data").Range("DZ" & rowNum), "Currency")
        If ActiveCell.Offset(0, 1) = "% of Subtotal" Then
            ActiveCell.Offset(0, 5).Value = Format(Worksheets("SR Data").Range("GF" & rowNum), "Percent")
        Else:
            ActiveCell.Offset(0, 5).Value = Format(Worksheets("SR Data").Range("EA" & rowNum), "Currency")
        End If
        ActiveCell.Offset(0, 6).Value = Format(Worksheets("SR Data").Range("EB" & rowNum), "Currency")
        ActiveCell.Offset(0, 8).Value = Format(Worksheets("SR Data").Range("EC" & rowNum), "Currency")
        If ActiveCell.Offset(0, 1) = "% of Subtotal" Then
            ActiveCell.Offset(0, 9).Value = Format(Worksheets("SR Data").Range("GG" & rowNum), "Percent")
        Else:
            ActiveCell.Offset(0, 9).Value = Format(Worksheets("SR Data").Range("ED" & rowNum), "Currency")
        End If
        ActiveCell.Offset(0, 10).Value = Format(Worksheets("SR Data").Range("EE" & rowNum), "Currency")
        ActiveCell.Offset(0, 12).Value = Format(Worksheets("SR Data").Range("EF" & rowNum), "Currency")
        ActiveCell.Offset(1).EntireRow.Insert
    End If
End Sub

Public Sub ImportOldSpend()
    Dim chargeCount As Integer
    Dim loc As Range
    
    Application.ScreenUpdating = False
    Worksheets("SR Data").Activate
    For Each loc In Range("SRLoc")
        loc.Select
        If TypeName(loc.Value) = "Double" Then
                Call InsertCharge1(loc.Value)
        End If
    Next
    Worksheets("Dashboard").Activate
    Application.ScreenUpdating = True
End Sub

Private Sub InsertCharge1(loc As Double)
    Dim ind As String

    ind = "AA"
    SRrowNum = WorksheetFunction.Match(loc, Worksheets("SR Data").Range("SRLoc"), 0) + 8
    ASRrowNum = WorksheetFunction.Match(loc, Worksheets("INV").Range("locations"), 0) + 7
    Worksheets("SR Data").Range("F" & SRrowNum).Select
    
    'basic service charge, container 1
    If Worksheets("ASR").Range("AA" & ASRrowNum).Value <> "" Then
        ActiveCell.Value = Worksheets("ASR").Range("AA" & ASRrowNum).Value
        ActiveCell.Offset(, 1).Value = Worksheets("ASR").Range("AB" & ASRrowNum).Value
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("BC" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("AO" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BVR" & ASRrowNum).Value
        count = count + 1
        'Environmental Fee
        If Worksheets("ASR").Range("AP" & ASRrowNum).Value <> "" Then
            ind = "AP"
        'Fee Type 1
        ElseIf Worksheets("ASR").Range("AR" & ASRrowNum).Value <> "" Then
            ind = "AR"
        'Vendor 2 service'
        ElseIf Worksheets("ASR").Range("CA" & ASRrowNum).Value <> "" Then
            ind = "CA"
        End If
        
        'Call Charge 2 with the location, index on the ASR, and charge count
        Call InsertCharge2(loc, ind)
        
    Else:
        Exit Sub
    End If
End Sub

Private Sub InsertCharge2(loc As Double, ind As String)
    
    Worksheets("SR Data").Range("U" & SRrowNum).Select
    If ind = "AP" Then
    'we are using the env. fee for vendor 1'
        ActiveCell.Offset(, 2).Value = "Environmental Fee"
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("AP" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BVS" & ASRrowNum).Value
        'check fee type 1, else vendor 2
        If Worksheets("ASR").Range("AR" & ASRrowNum).Value <> "" Then
            ind = "AR"
        ElseIf Worksheets("ASR").Range("CA" & ASRrowNum).Value <> "" Then
            ind = "CA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "AR" Then
    'we are using fee type 1 for vendor 1
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("AR" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("AS" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BVV" & ASRrowNum).Value
        'check fee type 2, else vendor 2
        If Worksheets("ASR").Range("AT" & ASRrowNum).Value <> "" Then
            ind = "AT"
        ElseIf Worksheets("ASR").Range("CA" & ASRrowNum).Value <> "" Then
            ind = "CA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "CA" Then
    'we are using vendor 2 now
        If Worksheets("ASR").Range("CA" & ASRrowNum).Value <> Worksheets("ASR").Range("AA" & ASRrowNum).Value Then
            ActiveCell.Value = Worksheets("ASR").Range("CA" & ASRrowNum).Value
            ActiveCell.Offset(, 1).Value = Worksheets("ASR").Range("CB" & ASRrowNum).Value
        End If
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("DC" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("CO" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BXS" & ASRrowNum).Value
        'check Env. Fee, else check fee type 1, else move to vendor 3
        If Worksheets("ASR").Range("CP" & ASRrowNum).Value <> "" Then
            ind = "CP"
        'Fee Type 1
        ElseIf Worksheets("ASR").Range("CR " & ASRrowNum).Value <> "" Then
            ind = "CR"
        'Vendor 3 service'
        ElseIf Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
    
    Else: Exit Sub
    
    End If
    
    
    Call InsertCharge3(loc, ind)
End Sub

Private Sub InsertCharge3(loc As Double, ind As String)
    Worksheets("SR Data").Range("AH" & SRrowNum).Select
    
    If ind = "AR" Then
    'we are using the fee type 1 for vendor 1'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("AR" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("AS" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BVV" & ASRrowNum).Value
        'check fee type 2, else vendor 2
        If Worksheets("ASR").Range("AT" & ASRrowNum).Value <> "" Then
            ind = "AT"
        ElseIf Worksheets("ASR").Range("CA" & ASRrowNum).Value <> "" Then
            ind = "CA"
        Else: ind = "NULL"
        End If
        
        
    ElseIf ind = "AT" Then
    'we are using fee type 2 for vendor 1
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("AT" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("AU" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BVY" & ASRrowNum).Value
        'check fee type 3, else move to vendor 2
        If Worksheets("ASR").Range("AV" & ASRrowNum).Value <> "" Then
            ind = "AV"
        ElseIf Worksheets("ASR").Range("CA" & ASRrowNum).Value <> "" Then
            ind = "CA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "CA" Then
    'we are using vendor 2 now
        If Worksheets("ASR").Range("CA" & ASRrowNum).Value <> Worksheets("ASR").Range("AA" & ASRrowNum).Value Then
            ActiveCell.Value = Worksheets("ASR").Range("CA" & ASRrowNum).Value
            ActiveCell.Offset(, 1).Value = Worksheets("ASR").Range("CB" & ASRrowNum).Value
        End If
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("DC" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("CO" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BXS" & ASRrowNum).Value
        'Env. Fee
        If Worksheets("ASR").Range("CP" & ASRrowNum).Value <> "" Then
            ind = "CP"
        'Fee Type 1
        ElseIf Worksheets("ASR").Range("CR" & ASRrowNum).Value <> "" Then
            ind = "CR"
        'Vendor 3 service'
        ElseIf Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "CP" Then
    'we are using env fee from vendor 2'
        ActiveCell.Offset(, 2).Value = "Environmental Fee"
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("CP" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BXT" & ASRrowNum).Value
        'check fee type 1, else vendor 3
        If Worksheets("ASR").Range("CR" & ASRrowNum).Value <> "" Then
            ind = "CR"
        ElseIf Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "CR" Then
    'we are using fee type 1 from vendor 2
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("CR" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("CS" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BXW" & ASRrowNum).Value
        'check fee type 2, else move to vendor 3
        If Worksheets("ASR").Range("CT" & ASRrowNum).Value <> "" Then
            ind = "CT"
        ElseIf Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
    
    ElseIf ind = "EA" Then
    'we are using vendor 3 service now
        If Worksheets("ASR").Range("EA" & ASRrowNum).Value <> Worksheets("ASR").Range("CA" & ASRrowNum).Value Then
            ActiveCell.Value = Worksheets("ASR").Range("EA" & ASRrowNum).Value
            ActiveCell.Offset(, 1).Value = Worksheets("ASR").Range("EB" & ASRrowNum).Value
        End If
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("FC" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("EO" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BZV" & ASRrowNum).Value
        'check Env. Fee, else check fee type 1, else move to vendor 3
        If Worksheets("ASR").Range("EP" & ASRrowNum).Value <> "" Then
            ind = "EP"
        'Fee Type 1
        ElseIf Worksheets("ASR").Range("ER " & ASRrowNum).Value <> "" Then
            ind = "ER"
        'Vendor 3 service'
        ElseIf Worksheets("ASR").Range("GA" & ASRrowNum).Value <> "" Then
            ind = "GA"
        Else: ind = "NULL"
        End If
    Else:
        Exit Sub
    End If

    Call InsertCharge4(loc, ind)
End Sub

Private Sub InsertCharge4(loc As Double, ind As String)
    Worksheets("SR Data").Range("AU" & SRrowNum).Select
    
    
    If ind = "AT" Then
    'we are using fee type 2 for vendor 1
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("AT" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("AU" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BVY" & ASRrowNum).Value
        'check fee type 3, else move to vendor 2
        If Worksheets("ASR").Range("AV" & ASRrowNum).Value <> "" Then
            ind = "AV"
        ElseIf Worksheets("ASR").Range("CA" & ASRrowNum).Value <> "" Then
            ind = "CA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "AV" Then
    'we are using the fee type 3 for vendor 1'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("AV" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("AW" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BWB" & ASRrowNum).Value
        'check fee type 2, else vendor 2
        If Worksheets("ASR").Range("AX" & ASRrowNum).Value <> "" Then
            ind = "AX"
        ElseIf Worksheets("ASR").Range("CA" & ASRrowNum).Value <> "" Then
            ind = "CA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "CA" Then
    'we are using vendor 2 now
        If Worksheets("ASR").Range("CA" & ASRrowNum).Value <> Worksheets("ASR").Range("AA" & ASRrowNum).Value Then
            ActiveCell.Value = Worksheets("ASR").Range("CA" & ASRrowNum).Value
            ActiveCell.Offset(, 1).Value = Worksheets("ASR").Range("CB" & ASRrowNum).Value
        End If
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("DC" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("CO" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BXS" & ASRrowNum).Value
        'Env. Fee
        If Worksheets("ASR").Range("CP" & ASRrowNum).Value <> "" Then
            ind = "CP"
        'Fee Type 1
        ElseIf Worksheets("ASR").Range("CR" & ASRrowNum).Value <> "" Then
            ind = "CR"
        'Vendor 3 service'
        ElseIf Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "CP" Then
    'we are using env fee from vendor 2'
        ActiveCell.Offset(, 2).Value = "Environmental Fee"
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("CP" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BXT" & ASRrowNum).Value
        'check fee type 1, else vendor 3
        If Worksheets("ASR").Range("CR" & ASRrowNum).Value <> "" Then
            ind = "CR"
        ElseIf Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "CR" Then
    'we are using fee type 1 from vendor 2
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("CR" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("CS" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BXW" & ASRrowNum).Value
        'check fee type 2, else move to vendor 3
        If Worksheets("ASR").Range("CT" & ASRrowNum).Value <> "" Then
            ind = "CT"
        ElseIf Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "CT" Then
    'we are using fee type 2 from vendor 2'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("CT" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("CU" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BXZ" & ASRrowNum).Value
        'check fee type 1, else vendor 3
        If Worksheets("ASR").Range("CV" & ASRrowNum).Value <> "" Then
            ind = "CR"
        ElseIf Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "EP" Then
    'we are using env fee from vendor 3'
        ActiveCell.Offset(, 2).Value = "Environmental Fee"
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("EP" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BZW" & ASRrowNum).Value
        'check fee type 1, else vendor 4
        If Worksheets("ASR").Range("ER" & ASRrowNum).Value <> "" Then
            ind = "ER"
        ElseIf Worksheets("ASR").Range("GA" & ASRrowNum).Value <> "" Then
            ind = "GA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "ER" Then
    'we are using fee type 1 from vendor 3'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("ER" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("ES" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BZZ" & ASRrowNum).Value
        'check fee type 1, else vendor 4
        If Worksheets("ASR").Range("ET" & ASRrowNum).Value <> "" Then
            ind = "ET"
        ElseIf Worksheets("ASR").Range("GA" & ASRrowNum).Value <> "" Then
            ind = "GA"
        Else: ind = "NULL"
        End If
    
    ElseIf ind = "EA" Then
    'we are using vendor 3 service now
        If Worksheets("ASR").Range("EA" & ASRrowNum).Value <> Worksheets("ASR").Range("CA" & ASRrowNum).Value Then
            ActiveCell.Value = Worksheets("ASR").Range("EA" & ASRrowNum).Value
            ActiveCell.Offset(, 1).Value = Worksheets("ASR").Range("EB" & ASRrowNum).Value
            ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BZV" & ASRrowNum).Value
        End If
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("FC" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("EO" & ASRrowNum).Value
        'check Env. Fee, else check fee type 1, else move to vendor 4
        If Worksheets("ASR").Range("EP" & ASRrowNum).Value <> "" Then
            ind = "EP"
        'Fee Type 1
        ElseIf Worksheets("ASR").Range("ER " & ASRrowNum).Value <> "" Then
            ind = "ER"
        'Vendor 4 service'
        ElseIf Worksheets("ASR").Range("GA" & ASRrowNum).Value <> "" Then
            ind = "GA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "GA" Then
    'we are using vendor 4 service now
        If Worksheets("ASR").Range("GA" & ASRrowNum).Value <> Worksheets("ASR").Range("EA" & ASRrowNum).Value Then
            ActiveCell.Value = Worksheets("ASR").Range("GA" & ASRrowNum).Value
            ActiveCell.Offset(, 1).Value = Worksheets("ASR").Range("GB" & ASRrowNum).Value
        End If
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("HC" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("GO" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CBY" & ASRrowNum).Value
        'check Env. Fee, else check fee type 1, else move to vendor 5
        If Worksheets("ASR").Range("GP" & ASRrowNum).Value <> "" Then
            ind = "GP"
        'Fee Type 1
        ElseIf Worksheets("ASR").Range("GR " & ASRrowNum).Value <> "" Then
            ind = "GR"
        'Vendor 5 service'
        ElseIf Worksheets("ASR").Range("IA" & ASRrowNum).Value <> "" Then
            ind = "IA"
        Else: ind = "NULL"
        End If
    Else:
        Exit Sub
    End If
    
    Call InsertCharge5(loc, ind)
End Sub

Private Sub InsertCharge5(loc As Double, ind As String)
    Worksheets("SR Data").Range("BH" & SRrowNum).Select
    
            
    If ind = "AV" Then
    'we are using the fee type 3 for vendor 1'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("AV" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("AW" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BWB" & ASRrowNum).Value
        'check fee type 4, else vendor 2
        If Worksheets("ASR").Range("AX" & ASRrowNum).Value <> "" Then
            ind = "AX"
        ElseIf Worksheets("ASR").Range("CA" & ASRrowNum).Value <> "" Then
            ind = "CA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "AX" Then
    'we are using fee type 4 for vendor 1
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("AX" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("AY" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BWE" & ASRrowNum).Value
        'check fee type 5, else move to vendor 2
        If Worksheets("ASR").Range("AZ" & ASRrowNum).Value <> "" Then
            ind = "AZ"
        ElseIf Worksheets("ASR").Range("CA" & ASRrowNum).Value <> "" Then
            ind = "CA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "CA" Then
    'we are using vendor 2 now
        If Worksheets("ASR").Range("CA" & ASRrowNum).Value <> Worksheets("ASR").Range("AA" & ASRrowNum).Value Then
            ActiveCell.Value = Worksheets("ASR").Range("CA" & ASRrowNum).Value
            ActiveCell.Offset(, 1).Value = Worksheets("ASR").Range("CB" & ASRrowNum).Value
        End If
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("DC" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("CO" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BXS" & ASRrowNum).Value
        'Env. Fee
        If Worksheets("ASR").Range("CP" & ASRrowNum).Value <> "" Then
            ind = "CP"
        'Fee Type 1
        ElseIf Worksheets("ASR").Range("CR" & ASRrowNum).Value <> "" Then
            ind = "CR"
        'Vendor 3 service'
        ElseIf Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "CP" Then
    'we are using env fee from vendor 2'
        ActiveCell.Offset(, 2).Value = "Environmental Fee"
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("CP" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BXT" & ASRrowNum).Value
        'check fee type 1, else vendor 3
        If Worksheets("ASR").Range("CR" & ASRrowNum).Value <> "" Then
            ind = "CR"
        ElseIf Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "CR" Then
    'we are using fee type 1 from vendor 2
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("CR" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("CS" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BXW" & ASRrowNum).Value
        'check fee type 2, else move to vendor 3
        If Worksheets("ASR").Range("CT" & ASRrowNum).Value <> "" Then
            ind = "CT"
        ElseIf Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "CT" Then
    'we are using fee type 2 from vendor 2'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("CT" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("CU" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BXZ" & ASRrowNum).Value
        'check fee type 3, else vendor 3
        If Worksheets("ASR").Range("CV" & ASRrowNum).Value <> "" Then
            ind = "CV"
        ElseIf Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "CV" Then
    'we are using fee type 3 from vendor 2'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("CV" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("CW" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BYC" & ASRrowNum).Value
        'check fee type 4, else vendor 3
        If Worksheets("ASR").Range("CX" & ASRrowNum).Value <> "" Then
            ind = "CX"
        ElseIf Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "EP" Then
    'we are using env fee from vendor 3'
        ActiveCell.Offset(, 2).Value = "Environmental Fee"
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("EP" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BZW" & ASRrowNum).Value
        'check fee type 1, else vendor 4
        If Worksheets("ASR").Range("ER" & ASRrowNum).Value <> "" Then
            ind = "ER"
        ElseIf Worksheets("ASR").Range("GA" & ASRrowNum).Value <> "" Then
            ind = "GA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "ER" Then
    'we are using fee type 1 from vendor 3'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("ER" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("ES" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BZZ" & ASRrowNum).Value
        'check fee type 1, else vendor 4
        If Worksheets("ASR").Range("ET" & ASRrowNum).Value <> "" Then
            ind = "ET"
        ElseIf Worksheets("ASR").Range("GA" & ASRrowNum).Value <> "" Then
            ind = "GA"
        Else: ind = "NULL"
        End If
    
    ElseIf ind = "ET" Then
    'we are using fee type 2 from vendor 3'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("ET" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("EU" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CAC" & ASRrowNum).Value
        'check fee type 1, else vendor 4
        If Worksheets("ASR").Range("EV" & ASRrowNum).Value <> "" Then
            ind = "EV"
        ElseIf Worksheets("ASR").Range("GA" & ASRrowNum).Value <> "" Then
            ind = "GA"
        Else: ind = "NULL"
        End If
    
    ElseIf ind = "EA" Then
    'we are using vendor 3 service now
        If Worksheets("ASR").Range("EA" & ASRrowNum).Value <> Worksheets("ASR").Range("CA" & ASRrowNum).Value Then
            ActiveCell.Value = Worksheets("ASR").Range("EA" & ASRrowNum).Value
            ActiveCell.Offset(, 1).Value = Worksheets("ASR").Range("EB" & ASRrowNum).Value
        End If
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("FC" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("EO" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BZV" & ASRrowNum).Value
        'check Env. Fee, else check fee type 1, else move to vendor 4
        If Worksheets("ASR").Range("EP" & ASRrowNum).Value <> "" Then
            ind = "EP"
        'Fee Type 1
        ElseIf Worksheets("ASR").Range("ER " & ASRrowNum).Value <> "" Then
            ind = "ER"
        'Vendor 4 service'
        ElseIf Worksheets("ASR").Range("GA" & ASRrowNum).Value <> "" Then
            ind = "GA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "GP " Then
    'we are using env fee from vendor 4'
        ActiveCell.Offset(, 2).Value = "Environmental Fee"
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("GP" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CBZ" & ASRrowNum).Value
        'check fee type 1, else vendor 5
        If Worksheets("ASR").Range("GR" & ASRrowNum).Value <> "" Then
            ind = "GR"
        ElseIf Worksheets("ASR").Range("IA" & ASRrowNum).Value <> "" Then
            ind = "IA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "GR" Then
    'we are using fee type 1 from vendor 4'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("GR" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("GS" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CCC" & ASRrowNum).Value
        'check fee type 1, else vendor 5
        If Worksheets("ASR").Range("GT" & ASRrowNum).Value <> "" Then
            ind = "GT"
        ElseIf Worksheets("ASR").Range("IA" & ASRrowNum).Value <> "" Then
            ind = "IA"
        Else: ind = "NULL"
        End If
    
    ElseIf ind = "GA" Then
    'we are using vendor 4 service now
        If Worksheets("ASR").Range("GA" & ASRrowNum).Value <> Worksheets("ASR").Range("EA" & ASRrowNum).Value Then
            ActiveCell.Value = Worksheets("ASR").Range("GA" & ASRrowNum).Value
            ActiveCell.Offset(, 1).Value = Worksheets("ASR").Range("GB" & ASRrowNum).Value
        End If
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("HC" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("GO" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CBY" & ASRrowNum).Value
        'check Env. Fee, else check fee type 1, else move to vendor 5
        If Worksheets("ASR").Range("GP" & ASRrowNum).Value <> "" Then
            ind = "GR"
        'Fee Type 1
        ElseIf Worksheets("ASR").Range("GR " & ASRrowNum).Value <> "" Then
            ind = "GR"
        'Vendor 5 service'
        ElseIf Worksheets("ASR").Range("IA" & ASRrowNum).Value <> "" Then
            ind = "IA"
        Else: ind = "NULL"
        End If
    
    ElseIf ind = "IA" Then
    'we are using vendor 5 service now
        If Worksheets("ASR").Range("IA" & ASRrowNum).Value <> Worksheets("ASR").Range("GA" & ASRrowNum).Value Then
            ActiveCell.Value = Worksheets("ASR").Range("IA" & ASRrowNum).Value
            ActiveCell.Offset(, 1).Value = Worksheets("ASR").Range("IB" & ASRrowNum).Value
        End If
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("JC" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("IO" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CEB" & ASRrowNum).Value
        'check Env. Fee, else check fee type 1, else move to vendor 6
        If Worksheets("ASR").Range("IP" & ASRrowNum).Value <> "" Then
            ind = "IR"
        'Fee Type 1
        ElseIf Worksheets("ASR").Range("IR " & ASRrowNum).Value <> "" Then
            ind = "IR"
        'Vendor 6 service COMPACTOR SO WE WILL NOT GO FURTHER INTO THE KS UNTIL NEXT TEMPLATE ROLLOUT'
        ElseIf Worksheets("ASR").Range("KA" & ASRrowNum).Value <> "" Then
            ind = "KA"
        Else: ind = "NULL"
        End If
        
    Else:
        Exit Sub
    End If
    
    Call InsertCharge6(loc, ind)
End Sub

Private Sub InsertCharge6(loc As Double, ind As String)
    Worksheets("SR Data").Range("BU" & SRrowNum).Select
    
        
    If ind = "AX" Then
    'we are using fee type 4 for vendor 1
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("AX" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("AY" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BWE" & ASRrowNum).Value
        'check fee type 5, else move to vendor 2
        If Worksheets("ASR").Range("AZ" & ASRrowNum).Value <> "" Then
            ind = "AZ"
        ElseIf Worksheets("ASR").Range("CA" & ASRrowNum).Value <> "" Then
            ind = "CA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "AZ" Then
    'we are using the fee type 5 for vendor 1'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("AZ" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("BA" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BWG" & ASRrowNum).Value
        'check service 2
        If Worksheets("ASR").Range("CA" & ASRrowNum).Value <> "" Then
            ind = "CA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "CA" Then
    'we are using vendor 2 now
        If Worksheets("ASR").Range("CA" & ASRrowNum).Value <> Worksheets("ASR").Range("AA" & ASRrowNum).Value Then
            ActiveCell.Value = Worksheets("ASR").Range("CA" & ASRrowNum).Value
            ActiveCell.Offset(, 1).Value = Worksheets("ASR").Range("CB" & ASRrowNum).Value
        End If
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("DC" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("CO" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BXS" & ASRrowNum).Value
        'Env. Fee
        If Worksheets("ASR").Range("CP" & ASRrowNum).Value <> "" Then
            ind = "CP"
        'Fee Type 1
        ElseIf Worksheets("ASR").Range("CR" & ASRrowNum).Value <> "" Then
            ind = "CR"
        'Vendor 3 service'
        ElseIf Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "CP" Then
    'we are using env fee from vendor 2'
        ActiveCell.Offset(, 2).Value = "Environmental Fee"
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("CP" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BXT" & ASRrowNum).Value
        'check fee type 1, else vendor 3
        If Worksheets("ASR").Range("CR" & ASRrowNum).Value <> "" Then
            ind = "CR"
        ElseIf Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "CR" Then
    'we are using fee type 1 from vendor 2
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("CR" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("CS" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BXW" & ASRrowNum).Value
        'check fee type 2, else move to vendor 3
        If Worksheets("ASR").Range("CT" & ASRrowNum).Value <> "" Then
            ind = "CT"
        ElseIf Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "CT" Then
    'we are using fee type 2 from vendor 2'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("CT" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("CU" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BXZ" & ASRrowNum).Value
        'check fee type 3, else vendor 3
        If Worksheets("ASR").Range("CV" & ASRrowNum).Value <> "" Then
            ind = "CV"
        ElseIf Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "CV" Then
    'we are using fee type 3 from vendor 2'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("CV" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("CW" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BYC" & ASRrowNum).Value
        'check fee type 4, else vendor 3
        If Worksheets("ASR").Range("CX" & ASRrowNum).Value <> "" Then
            ind = "CX"
        ElseIf Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "CX" Then
    'we are using the fee type 4 for vendor 2'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("CX" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("CY" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BYF" & ASRrowNum).Value
        'check fee type 5, else vendor 3
        If Worksheets("ASR").Range("CZ" & ASRrowNum).Value <> "" Then
            ind = "CZ"
        ElseIf Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "EP" Then
    'we are using env fee from vendor 3'
        ActiveCell.Offset(, 2).Value = "Environmental Fee"
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("EP" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BZW" & ASRrowNum).Value
        'check fee type 1, else vendor 4
        If Worksheets("ASR").Range("ER" & ASRrowNum).Value <> "" Then
            ind = "ER"
        ElseIf Worksheets("ASR").Range("GA" & ASRrowNum).Value <> "" Then
            ind = "GA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "ER" Then
    'we are using fee type 1 from vendor 3'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("ER" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("ES" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BZZ" & ASRrowNum).Value
        'check fee type 2, else vendor 4
        If Worksheets("ASR").Range("ET" & ASRrowNum).Value <> "" Then
            ind = "ET"
        ElseIf Worksheets("ASR").Range("GA" & ASRrowNum).Value <> "" Then
            ind = "GA"
        Else: ind = "NULL"
        End If
    
    ElseIf ind = "ET" Then
    'we are using fee type 2 from vendor 3'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("ET" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("EU" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CAC" & ASRrowNum).Value
        'check fee type 3, else vendor 4
        If Worksheets("ASR").Range("EV" & ASRrowNum).Value <> "" Then
            ind = "EV"
        ElseIf Worksheets("ASR").Range("GA" & ASRrowNum).Value <> "" Then
            ind = "GA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "EV" Then
    'we are using the fee type  3 for vendor 3'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("EV" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("EW" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CAF" & ASRrowNum).Value
        'check fee type 4, else vendor 4
        If Worksheets("ASR").Range("EX" & ASRrowNum).Value <> "" Then
            ind = "EX"
        ElseIf Worksheets("ASR").Range("GA" & ASRrowNum).Value <> "" Then
            ind = "GA"
        Else: ind = "NULL"
        End If
    
    ElseIf ind = "EA" Then
    'we are using vendor 3 service now
        If Worksheets("ASR").Range("EA" & ASRrowNum).Value <> Worksheets("ASR").Range("CA" & ASRrowNum).Value Then
            ActiveCell.Value = Worksheets("ASR").Range("EA" & ASRrowNum).Value
            ActiveCell.Offset(, 1).Value = Worksheets("ASR").Range("EB" & ASRrowNum).Value
        End If
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("FC" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("EO" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BZV" & ASRrowNum).Value
        'check Env. Fee, else check fee type 1, else move to vendor 4
        If Worksheets("ASR").Range("EP" & ASRrowNum).Value <> "" Then
            ind = "EP"
        'Fee Type 1
        ElseIf Worksheets("ASR").Range("ER " & ASRrowNum).Value <> "" Then
            ind = "ER"
        'Vendor 4 service'
        ElseIf Worksheets("ASR").Range("GA" & ASRrowNum).Value <> "" Then
            ind = "GA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "GP " Then
    'we are using env fee from vendor 4'
        ActiveCell.Offset(, 2).Value = "Environmental Fee"
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("GP" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CBZ" & ASRrowNum).Value
        'check fee type 1, else vendor 5
        If Worksheets("ASR").Range("GR" & ASRrowNum).Value <> "" Then
            ind = "GR"
        ElseIf Worksheets("ASR").Range("IA" & ASRrowNum).Value <> "" Then
            ind = "IA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "GR" Then
    'we are using fee type 1 from vendor 4'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("GR" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("GS" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CCC" & ASRrowNum).Value
        'check fee type 1, else vendor 5
        If Worksheets("ASR").Range("GT" & ASRrowNum).Value <> "" Then
            ind = "GT"
        ElseIf Worksheets("ASR").Range("IA" & ASRrowNum).Value <> "" Then
            ind = "IA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "GT" Then
    'we are using fee type 2 from vendor 4'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("GT" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("GU" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CCF" & ASRrowNum).Value
        'check fee type 3, else vendor 5
        If Worksheets("ASR").Range("GV" & ASRrowNum).Value <> "" Then
            ind = "GV"
        ElseIf Worksheets("ASR").Range("IA" & ASRrowNum).Value <> "" Then
            ind = "IA"
        Else: ind = "NULL"
        End If
    
    ElseIf ind = "GA" Then
    'we are using vendor 4 service now
        If Worksheets("ASR").Range("GA" & ASRrowNum).Value <> Worksheets("ASR").Range("EA" & ASRrowNum).Value Then
            ActiveCell.Value = Worksheets("ASR").Range("GA" & ASRrowNum).Value
            ActiveCell.Offset(, 1).Value = Worksheets("ASR").Range("GB" & ASRrowNum).Value
        End If
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("HC" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("GO" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CBY" & ASRrowNum).Value
        'check Env. Fee, else check fee type 1, else move to vendor 5
        If Worksheets("ASR").Range("GP" & ASRrowNum).Value <> "" Then
            ind = "GR"
        'Fee Type 1
        ElseIf Worksheets("ASR").Range("GR " & ASRrowNum).Value <> "" Then
            ind = "GR"
        'Vendor 5 service'
        ElseIf Worksheets("ASR").Range("IA" & ASRrowNum).Value <> "" Then
            ind = "IA"
        Else: ind = "NULL"
        End If
    
    ElseIf ind = "IA" Then
    'we are using vendor 5 service now
        If Worksheets("ASR").Range("IA" & ASRrowNum).Value <> Worksheets("ASR").Range("GA" & ASRrowNum).Value Then
            ActiveCell.Value = Worksheets("ASR").Range("IA" & ASRrowNum).Value
            ActiveCell.Offset(, 1).Value = Worksheets("ASR").Range("IB" & ASRrowNum).Value
        End If
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("JC" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("IO" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CEB" & ASRrowNum).Value
        'check Env. Fee, else check fee type 1, else move to vendor 6
        If Worksheets("ASR").Range("IP" & ASRrowNum).Value <> "" Then
            ind = "IR"
        'Fee Type 1
        ElseIf Worksheets("ASR").Range("IR " & ASRrowNum).Value <> "" Then
            ind = "IR"
        'Vendor 6 service COMPACTOR SO WE WILL NOT GO FURTHER INTO THE KS UNTIL NEXT TEMPLATE ROLLOUT'
        ElseIf Worksheets("ASR").Range("KA" & ASRrowNum).Value <> "" Then
            ind = "KA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "IP" Then
    'we are using env fee from vendor 5'
        ActiveCell.Offset(, 2).Value = "Environmental Fee"
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("IP" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CEC" & ASRrowNum).Value
        'check fee type 1, else vendor 6
        If Worksheets("ASR").Range("IR" & ASRrowNum).Value <> "" Then
            ind = "IR"
        ElseIf Worksheets("ASR").Range("KA" & ASRrowNum).Value <> "" Then
            ind = "KA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "IR" Then
    'we are using fee type 1 from vendor 5'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("IR" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("IS" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CEF" & ASRrowNum).Value
        'check fee type 2, else vendor 6
        If Worksheets("ASR").Range("IT" & ASRrowNum).Value <> "" Then
            ind = "IT"
        ElseIf Worksheets("ASR").Range("KA" & ASRrowNum).Value <> "" Then
            ind = "KA"
        Else: ind = "NULL"
        End If
    
    Else: Exit Sub
    
    End If
    
    Call InsertCharge7(loc, ind)
End Sub

Private Sub InsertCharge7(loc As Double, ind As String)
    Worksheets("SR Data").Range("CH" & SRrowNum).Select
    
        
        
    If ind = "AZ" Then
    'we are using the fee type 5 for vendor 1'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("AZ" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("BA" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BWH" & ASRrowNum).Value
        'check service 2
        If Worksheets("ASR").Range("CA" & ASRrowNum).Value <> "" Then
            ind = "CA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "CA" Then
    'we are using vendor 2 now
        If Worksheets("ASR").Range("CA" & ASRrowNum).Value <> Worksheets("ASR").Range("AA" & ASRrowNum).Value Then
            ActiveCell.Value = Worksheets("ASR").Range("CA" & ASRrowNum).Value
            ActiveCell.Offset(, 1).Value = Worksheets("ASR").Range("CB" & ASRrowNum).Value
        End If
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("DC" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("CO" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BXS" & ASRrowNum).Value
        'Env. Fee
        If Worksheets("ASR").Range("CP" & ASRrowNum).Value <> "" Then
            ind = "CP"
        'Fee Type 1
        ElseIf Worksheets("ASR").Range("CR" & ASRrowNum).Value <> "" Then
            ind = "CR"
        'Vendor 3 service'
        ElseIf Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "CP" Then
    'we are using env fee from vendor 2'
        ActiveCell.Offset(, 2).Value = "Environmental Fee"
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("CP" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BXT" & ASRrowNum).Value
        'check fee type 1, else vendor 3
        If Worksheets("ASR").Range("CR" & ASRrowNum).Value <> "" Then
            ind = "CR"
        ElseIf Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "CR" Then
    'we are using fee type 1 from vendor 2
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("CR" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("CS" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BXW" & ASRrowNum).Value
        'check fee type 2, else move to vendor 3
        If Worksheets("ASR").Range("CT" & ASRrowNum).Value <> "" Then
            ind = "CT"
        ElseIf Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "CT" Then
    'we are using fee type 2 from vendor 2'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("CT" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("CU" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BXZ" & ASRrowNum).Value
        'check fee type 3, else vendor 3
        If Worksheets("ASR").Range("CV" & ASRrowNum).Value <> "" Then
            ind = "CV"
        ElseIf Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "CV" Then
    'we are using fee type 3 from vendor 2'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("CV" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("CW" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BYC" & ASRrowNum).Value
        'check fee type 4, else vendor 3
        If Worksheets("ASR").Range("CX" & ASRrowNum).Value <> "" Then
            ind = "CX"
        ElseIf Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "CX" Then
    'we are using the fee type 4 for vendor 2'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("CX" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("CY" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BYF" & ASRrowNum).Value
        'check fee type 5, else vendor 3
        If Worksheets("ASR").Range("CZ" & ASRrowNum).Value <> "" Then
            ind = "CZ"
        ElseIf Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "CZ" Then
    'we are using the fee type 5 for vendor 2'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("CZ" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("DA" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BYH" & ASRrowNum).Value
        'check fee type 5, else vendor 3
        If Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "EP" Then
    'we are using env fee from vendor 3'
        ActiveCell.Offset(, 2).Value = "Environmental Fee"
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("EP" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BZW" & ASRrowNum).Value
        'check fee type 1, else vendor 4
        If Worksheets("ASR").Range("ER" & ASRrowNum).Value <> "" Then
            ind = "ER"
        ElseIf Worksheets("ASR").Range("GA" & ASRrowNum).Value <> "" Then
            ind = "GA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "ER" Then
    'we are using fee type 1 from vendor 3'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("ER" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("ES" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BZZ" & ASRrowNum).Value
        'check fee type 2, else vendor 4
        If Worksheets("ASR").Range("ET" & ASRrowNum).Value <> "" Then
            ind = "ET"
        ElseIf Worksheets("ASR").Range("GA" & ASRrowNum).Value <> "" Then
            ind = "GA"
        Else: ind = "NULL"
        End If
    
    ElseIf ind = "ET" Then
    'we are using fee type 2 from vendor 3'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("ET" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("EU" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CAC" & ASRrowNum).Value
        'check fee type 3, else vendor 4
        If Worksheets("ASR").Range("EV" & ASRrowNum).Value <> "" Then
            ind = "EV"
        ElseIf Worksheets("ASR").Range("GA" & ASRrowNum).Value <> "" Then
            ind = "GA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "EV" Then
    'we are using the fee type  3 for vendor 3'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("EV" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("EW" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CAF" & ASRrowNum).Value
        'check fee type 4, else vendor 4
        If Worksheets("ASR").Range("EX" & ASRrowNum).Value <> "" Then
            ind = "EX"
        ElseIf Worksheets("ASR").Range("GA" & ASRrowNum).Value <> "" Then
            ind = "GA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "EX" Then
    'we are using the fee type  4 for vendor 3'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("EX" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("EY" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CAI" & ASRrowNum).Value
        'check fee type 5, else vendor 4
        If Worksheets("ASR").Range("EZ" & ASRrowNum).Value <> "" Then
            ind = "EZ"
        ElseIf Worksheets("ASR").Range("GA" & ASRrowNum).Value <> "" Then
            ind = "GA"
        Else: ind = "NULL"
        End If
    
    ElseIf ind = "EA" Then
    'we are using vendor 3 service now
        If Worksheets("ASR").Range("EA" & ASRrowNum).Value <> Worksheets("ASR").Range("CA" & ASRrowNum).Value Then
            ActiveCell.Value = Worksheets("ASR").Range("EA" & ASRrowNum).Value
            ActiveCell.Offset(, 1).Value = Worksheets("ASR").Range("EB" & ASRrowNum).Value
        End If
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("FC" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("EO" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BZV" & ASRrowNum).Value
        'check Env. Fee, else check fee type 1, else move to vendor 4
        If Worksheets("ASR").Range("EP" & ASRrowNum).Value <> "" Then
            ind = "EP"
        'Fee Type 1
        ElseIf Worksheets("ASR").Range("ER " & ASRrowNum).Value <> "" Then
            ind = "ER"
        'Vendor 4 service'
        ElseIf Worksheets("ASR").Range("GA" & ASRrowNum).Value <> "" Then
            ind = "GA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "GP " Then
    'we are using env fee from vendor 4'
        ActiveCell.Offset(, 2).Value = "Environmental Fee"
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("GP" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CBZ" & ASRrowNum).Value
        'check fee type 1, else vendor 5
        If Worksheets("ASR").Range("GR" & ASRrowNum).Value <> "" Then
            ind = "GR"
        ElseIf Worksheets("ASR").Range("IA" & ASRrowNum).Value <> "" Then
            ind = "IA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "GR" Then
    'we are using fee type 1 from vendor 4'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("GR" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("GS" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CCC" & ASRrowNum).Value
        'check fee type 1, else vendor 5
        If Worksheets("ASR").Range("GT" & ASRrowNum).Value <> "" Then
            ind = "GT"
        ElseIf Worksheets("ASR").Range("IA" & ASRrowNum).Value <> "" Then
            ind = "IA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "GT" Then
    'we are using fee type 2 from vendor 4'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("GT" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("GU" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CCF" & ASRrowNum).Value
        'check fee type 3, else vendor 5
        If Worksheets("ASR").Range("GV" & ASRrowNum).Value <> "" Then
            ind = "GV"
        ElseIf Worksheets("ASR").Range("IA" & ASRrowNum).Value <> "" Then
            ind = "IA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "GV" Then
    'we are using fee type 3 from vendor 5'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("GV" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("GW" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CCI" & ASRrowNum).Value
        'check fee type 4, else vendor 6
        If Worksheets("ASR").Range("GX" & ASRrowNum).Value <> "" Then
            ind = "GX"
        ElseIf Worksheets("ASR").Range("IA" & ASRrowNum).Value <> "" Then
            ind = "IA"
        Else: ind = "NULL"
        End If
    
    ElseIf ind = "GA" Then
    'we are using vendor 4 service now
        If Worksheets("ASR").Range("GA" & ASRrowNum).Value <> Worksheets("ASR").Range("EA" & ASRrowNum).Value Then
            ActiveCell.Value = Worksheets("ASR").Range("GA" & ASRrowNum).Value
            ActiveCell.Offset(, 1).Value = Worksheets("ASR").Range("GB" & ASRrowNum).Value
        End If
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("HC" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("GO" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CBY" & ASRrowNum).Value
        'check Env. Fee, else check fee type 1, else move to vendor 5
        If Worksheets("ASR").Range("GP" & ASRrowNum).Value <> "" Then
            ind = "GR"
        'Fee Type 1
        ElseIf Worksheets("ASR").Range("GR " & ASRrowNum).Value <> "" Then
            ind = "GR"
        'Vendor 5 service'
        ElseIf Worksheets("ASR").Range("IA" & ASRrowNum).Value <> "" Then
            ind = "IA"
        Else: ind = "NULL"
        End If
    
    ElseIf ind = "IA" Then
    'we are using vendor 5 service now
        If Worksheets("ASR").Range("IA" & ASRrowNum).Value <> Worksheets("ASR").Range("GA" & ASRrowNum).Value Then
            ActiveCell.Value = Worksheets("ASR").Range("IA" & ASRrowNum).Value
            ActiveCell.Offset(, 1).Value = Worksheets("ASR").Range("IB" & ASRrowNum).Value
        End If
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("JC" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("IO" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CEB" & ASRrowNum).Value
        'check Env. Fee, else check fee type 1, else move to vendor 6
        If Worksheets("ASR").Range("IP" & ASRrowNum).Value <> "" Then
            ind = "IR"
        'Fee Type 1
        ElseIf Worksheets("ASR").Range("IR " & ASRrowNum).Value <> "" Then
            ind = "IR"
        'Vendor 6 service COMPACTOR SO WE WILL NOT GO FURTHER INTO THE KS UNTIL NEXT TEMPLATE ROLLOUT'
        ElseIf Worksheets("ASR").Range("KA" & ASRrowNum).Value <> "" Then
            ind = "KA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "IP" Then
    'we are using env fee from vendor 5'
        ActiveCell.Offset(, 2).Value = "Environmental Fee"
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("IP" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CEC" & ASRrowNum).Value
        'check fee type 1, else vendor 6
        If Worksheets("ASR").Range("IR" & ASRrowNum).Value <> "" Then
            ind = "IR"
        ElseIf Worksheets("ASR").Range("KA" & ASRrowNum).Value <> "" Then
            ind = "KA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "IR" Then
    'we are using fee type 1 from vendor 5'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("IR" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("IS" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CEF" & ASRrowNum).Value
        'check fee type 2, else vendor 6
        If Worksheets("ASR").Range("IT" & ASRrowNum).Value <> "" Then
            ind = "IT"
        ElseIf Worksheets("ASR").Range("KA" & ASRrowNum).Value <> "" Then
            ind = "KA"
        Else: ind = "NULL"
        End If
    
    ElseIf ind = "IT" Then
    'we are using fee type 2 from vendor 5'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("IT" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("IU" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CEI" & ASRrowNum).Value
        'check fee type 3, else vendor 6
        If Worksheets("ASR").Range("IV" & ASRrowNum).Value <> "" Then
            ind = "IV"
        ElseIf Worksheets("ASR").Range("KA" & ASRrowNum).Value <> "" Then
            ind = "KA"
        Else: ind = "NULL"
        End If
    
    Else:
        Exit Sub
    End If
    
    Call InsertCharge8(loc, ind)
End Sub


Private Sub InsertCharge8(loc As Double, ind As String)
    Worksheets("SR Data").Range("CU" & SRrowNum).Select
    
        
    If ind = "CA" Then
    'we are using vendor 2 now
        If Worksheets("ASR").Range("CA" & ASRrowNum).Value <> Worksheets("ASR").Range("AA" & ASRrowNum).Value Then
            ActiveCell.Value = Worksheets("ASR").Range("CA" & ASRrowNum).Value
            ActiveCell.Offset(, 1).Value = Worksheets("ASR").Range("CB" & ASRrowNum).Value
        End If
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("DC" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("CO" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BXS" & ASRrowNum).Value
        'Env. Fee
        If Worksheets("ASR").Range("CP" & ASRrowNum).Value <> "" Then
            ind = "CP"
        'Fee Type 1
        ElseIf Worksheets("ASR").Range("CR" & ASRrowNum).Value <> "" Then
            ind = "CR"
        'Vendor 3 service'
        ElseIf Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "CP" Then
    'we are using env fee from vendor 2'
        ActiveCell.Offset(, 2).Value = "Environmental Fee"
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("CP" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BXT" & ASRrowNum).Value
        'check fee type 1, else vendor 3
        If Worksheets("ASR").Range("CR" & ASRrowNum).Value <> "" Then
            ind = "CR"
        ElseIf Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "CR" Then
    'we are using fee type 1 from vendor 2
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("CR" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("CS" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BXW" & ASRrowNum).Value
        'check fee type 2, else move to vendor 3
        If Worksheets("ASR").Range("CT" & ASRrowNum).Value <> "" Then
            ind = "CT"
        ElseIf Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "CT" Then
    'we are using fee type 2 from vendor 2'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("CT" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("CU" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BXZ" & ASRrowNum).Value
        'check fee type 3, else vendor 3
        If Worksheets("ASR").Range("CV" & ASRrowNum).Value <> "" Then
            ind = "CV"
        ElseIf Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "CV" Then
    'we are using fee type 3 from vendor 2'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("CV" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("CW" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BYC" & ASRrowNum).Value
        'check fee type 4, else vendor 3
        If Worksheets("ASR").Range("CX" & ASRrowNum).Value <> "" Then
            ind = "CX"
        ElseIf Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "CX" Then
    'we are using the fee type 4 for vendor 2'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("CX" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("CY" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BYF" & ASRrowNum).Value
        'check fee type 5, else vendor 3
        If Worksheets("ASR").Range("CZ" & ASRrowNum).Value <> "" Then
            ind = "CZ"
        ElseIf Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "CZ" Then
    'we are using the fee type 4 for vendor 2'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("CZ" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("DA" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BYH" & ASRrowNum).Value
        'check fee type 5, else vendor 3
        If Worksheets("ASR").Range("EA" & ASRrowNum).Value <> "" Then
            ind = "EA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "EP" Then
    'we are using env fee from vendor 3'
        ActiveCell.Offset(, 2).Value = "Environmental Fee"
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("EP" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BZW" & ASRrowNum).Value
        'check fee type 1, else vendor 4
        If Worksheets("ASR").Range("ER" & ASRrowNum).Value <> "" Then
            ind = "ER"
        ElseIf Worksheets("ASR").Range("GA" & ASRrowNum).Value <> "" Then
            ind = "GA"
        Else: ind = "NULL"
        End If
    
    ElseIf ind = "ER" Then
    'we are using fee type 1 from vendor 3'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("ER" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("ES" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BZZ" & ASRrowNum).Value
        'check fee type 2, else vendor 4
        If Worksheets("ASR").Range("ET" & ASRrowNum).Value <> "" Then
            ind = "ET"
        ElseIf Worksheets("ASR").Range("GA" & ASRrowNum).Value <> "" Then
            ind = "GA"
        Else: ind = "NULL"
        End If
    
    ElseIf ind = "ET" Then
    'we are using fee type 2 from vendor 3'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("ET" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("EU" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CAC" & ASRrowNum).Value
        'check fee type 3, else vendor 4
        If Worksheets("ASR").Range("EV" & ASRrowNum).Value <> "" Then
            ind = "EV"
        ElseIf Worksheets("ASR").Range("GA" & ASRrowNum).Value <> "" Then
            ind = "GA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "EV" Then
    'we are using the fee type  3 for vendor 3'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("EV" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("EW" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CAF" & ASRrowNum).Value
        'check fee type 4, else vendor 4
        If Worksheets("ASR").Range("EX" & ASRrowNum).Value <> "" Then
            ind = "EX"
        ElseIf Worksheets("ASR").Range("GA" & ASRrowNum).Value <> "" Then
            ind = "GA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "EX" Then
    'we are using the fee type  4 for vendor 3'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("EX" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("EY" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CAI" & ASRrowNum).Value
        'check fee type 5, else vendor 4
        If Worksheets("ASR").Range("EZ" & ASRrowNum).Value <> "" Then
            ind = "EZ"
        ElseIf Worksheets("ASR").Range("GA" & ASRrowNum).Value <> "" Then
            ind = "GA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "EZ" Then
    'we are using the fee type  5 for vendor 3'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("EZ" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("FA" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CAL" & ASRrowNum).Value
        'check vendor 4
        If Worksheets("ASR").Range("GA" & ASRrowNum).Value <> "" Then
            ind = "GA"
        Else: ind = "NULL"
        End If
    
    ElseIf ind = "EA" Then
    'we are using vendor 3 service now
        If Worksheets("ASR").Range("EA" & ASRrowNum).Value <> Worksheets("ASR").Range("CA" & ASRrowNum).Value Then
            ActiveCell.Value = Worksheets("ASR").Range("EA" & ASRrowNum).Value
            ActiveCell.Offset(, 1).Value = Worksheets("ASR").Range("EB" & ASRrowNum).Value
        End If
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("FC" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("EO" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("BZV" & ASRrowNum).Value
        'check Env. Fee, else check fee type 1, else move to vendor 4
        If Worksheets("ASR").Range("EP" & ASRrowNum).Value <> "" Then
            ind = "EP"
        'Fee Type 1
        ElseIf Worksheets("ASR").Range("ER " & ASRrowNum).Value <> "" Then
            ind = "ER"
        'Vendor 4 service'
        ElseIf Worksheets("ASR").Range("GA" & ASRrowNum).Value <> "" Then
            ind = "GA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "GP " Then
    'we are using env fee from vendor 4'
        ActiveCell.Offset(, 2).Value = "Environmental Fee"
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("GP" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CBZ" & ASRrowNum).Value
        'check fee type 1, else vendor 5
        If Worksheets("ASR").Range("GR" & ASRrowNum).Value <> "" Then
            ind = "GR"
        ElseIf Worksheets("ASR").Range("IA" & ASRrowNum).Value <> "" Then
            ind = "IA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "GR" Then
    'we are using fee type 1 from vendor 4'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("GR" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("GS" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CCC" & ASRrowNum).Value
        'check fee type 1, else vendor 5
        If Worksheets("ASR").Range("GT" & ASRrowNum).Value <> "" Then
            ind = "GT"
        ElseIf Worksheets("ASR").Range("IA" & ASRrowNum).Value <> "" Then
            ind = "IA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "GT" Then
    'we are using fee type 2 from vendor 4'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("GT" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("GU" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CCF" & ASRrowNum).Value
        'check fee type 3, else vendor 5
        If Worksheets("ASR").Range("GV" & ASRrowNum).Value <> "" Then
            ind = "GV"
        ElseIf Worksheets("ASR").Range("IA" & ASRrowNum).Value <> "" Then
            ind = "IA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "GV" Then
    'we are using fee type 3 from vendor 5'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("GV" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("GW" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CCI" & ASRrowNum).Value
        'check fee type 4, else vendor 6
        If Worksheets("ASR").Range("GX" & ASRrowNum).Value <> "" Then
            ind = "GX"
        ElseIf Worksheets("ASR").Range("IA" & ASRrowNum).Value <> "" Then
            ind = "IA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "GX" Then
    'we are using fee type 4 from vendor 5'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("GX" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("GY" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CCL" & ASRrowNum).Value
        'check fee type 5, else vendor 6
        If Worksheets("ASR").Range("GZ" & ASRrowNum).Value <> "" Then
            ind = "GZ"
        ElseIf Worksheets("ASR").Range("IA" & ASRrowNum).Value <> "" Then
            ind = "IA"
        Else: ind = "NULL"
        End If
    
    ElseIf ind = "GA" Then
    'we are using vendor 4 service now
        If Worksheets("ASR").Range("GA" & ASRrowNum).Value <> Worksheets("ASR").Range("EA" & ASRrowNum).Value Then
            ActiveCell.Value = Worksheets("ASR").Range("GA" & ASRrowNum).Value
            ActiveCell.Offset(, 1).Value = Worksheets("ASR").Range("GB" & ASRrowNum).Value
        End If
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("HC" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("GO" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CBY" & ASRrowNum).Value
        'check Env. Fee, else check fee type 1, else move to vendor 5
        If Worksheets("ASR").Range("GP" & ASRrowNum).Value <> "" Then
            ind = "GR"
        'Fee Type 1
        ElseIf Worksheets("ASR").Range("GR " & ASRrowNum).Value <> "" Then
            ind = "GR"
        'Vendor 5 service'
        ElseIf Worksheets("ASR").Range("IA" & ASRrowNum).Value <> "" Then
            ind = "IA"
        Else: ind = "NULL"
        End If
    
    ElseIf ind = "IA" Then
    'we are using vendor 5 service now
        If Worksheets("ASR").Range("IA" & ASRrowNum).Value <> Worksheets("ASR").Range("GA" & ASRrowNum).Value Then
            ActiveCell.Value = Worksheets("ASR").Range("IA" & ASRrowNum).Value
            ActiveCell.Offset(, 1).Value = Worksheets("ASR").Range("IB" & ASRrowNum).Value
        End If
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("JC" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("IO" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CEB" & ASRrowNum).Value
        'check Env. Fee, else check fee type 1, else move to vendor 6
        If Worksheets("ASR").Range("IP" & ASRrowNum).Value <> "" Then
            ind = "IR"
        'Fee Type 1
        ElseIf Worksheets("ASR").Range("IR " & ASRrowNum).Value <> "" Then
            ind = "IR"
        'Vendor 6 service COMPACTOR SO WE WILL NOT GO FURTHER INTO THE KS UNTIL NEXT TEMPLATE ROLLOUT'
        ElseIf Worksheets("ASR").Range("KA" & ASRrowNum).Value <> "" Then
            ind = "KA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "IP" Then
    'we are using env fee from vendor 5'
        ActiveCell.Offset(, 2).Value = "Environmental Fee"
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("IP" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CEC" & ASRrowNum).Value
        'check fee type 1, else vendor 6
        If Worksheets("ASR").Range("IR" & ASRrowNum).Value <> "" Then
            ind = "IR"
        ElseIf Worksheets("ASR").Range("KA" & ASRrowNum).Value <> "" Then
            ind = "KA"
        Else: ind = "NULL"
        End If
        
    ElseIf ind = "IR" Then
    'we are using fee type 1 from vendor 5'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("IR" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("IS" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CEF" & ASRrowNum).Value
        'check fee type 2, else vendor 6
        If Worksheets("ASR").Range("IT" & ASRrowNum).Value <> "" Then
            ind = "IT"
        ElseIf Worksheets("ASR").Range("KA" & ASRrowNum).Value <> "" Then
            ind = "KA"
        Else: ind = "NULL"
        End If
    
    ElseIf ind = "IT" Then
    'we are using fee type 2 from vendor 5'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("IT" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("IU" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CEI" & ASRrowNum).Value
        'check fee type 3, else vendor 6
        If Worksheets("ASR").Range("IV" & ASRrowNum).Value <> "" Then
            ind = "IV"
        ElseIf Worksheets("ASR").Range("KA" & ASRrowNum).Value <> "" Then
            ind = "KA"
        Else: ind = "NULL"
        End If
    
    ElseIf ind = "IV" Then
    'we are using fee type 3 from vendor 5'
        ActiveCell.Offset(, 2).Value = Worksheets("ASR").Range("IV" & ASRrowNum).Value
        ActiveCell.Offset(, 4).Value = 1
        ActiveCell.Offset(, 5).Value = Worksheets("ASR").Range("IW" & ASRrowNum).Value
        ActiveCell.Offset(, 8).Value = Worksheets("ASR").Range("CEL" & ASRrowNum).Value
        'check fee type 4, else vendor 6
        If Worksheets("ASR").Range("IX" & ASRrowNum).Value <> "" Then
            ind = "IX"
        ElseIf Worksheets("ASR").Range("KA" & ASRrowNum).Value <> "" Then
            ind = "KA"
        Else: ind = "NULL"
        End If
    
    End If
End Sub

